import Vue from 'vue'
import VueRouter from 'vue-router'
import IndexLayout from "../layout/IndexLayout.vue"

Vue.use(VueRouter)

const routes = [
    {
        path: "/",
        name: "IndexLayout",
        component: IndexLayout,
        children: [
            {
                path: "",
                name: "IndexPage",
                //  路由懒加载
                component: () => import("../views/index/IndexPage.vue")
            },

        ]

    },
    {
        path: "/PlayPage",
        name: "PlayPage",
        component: () => import("../views/play/PlayPage")
    }
]

const router = new VueRouter({
    routes
})

export default router
